use std::collections::HashMap;

trait DoRouter {

    fn parse(&self, str: String) -> Self;

    fn execute(&mut self);
}

#[derive(Default)]
pub struct ReceiveMessageRouter {
    pub message: String,
    pub output: Option<String>,
}

impl DoRouter for  ReceiveMessageRouter {
    fn parse(&self, str: String) -> Self {
        todo!()
    }


    fn execute(&mut self) {
        todo!()
    }
}

pub struct ReaderMessagesRouter;
impl DoRouter for ReaderMessagesRouter {

    fn parse(&self, _: String) -> Self {
        todo!()
    }

    fn execute(&mut self) {
        todo!()
    }
}

// #[test]
// fn router_test() {
//     let mut router_map : HashMap<&str, Box<dyn DoRouter>> = HashMap::new();
//     router_map.insert("receiveMessage", Box::new(ReceiveMessageRouter::default()));
//     router_map.insert("readMessage", Box::new(ReaderMessagesRouter));
//
//     let router = router_map.get("receiveMessage").unwrap();
//     let mut t = router.parse("sss");
//     t.execute();
// }